{% extends "mobileadmin/mobile_jquery/base.html" %}
{% load i18n jqmobile_tags%}

{% block navbar %}
	{% if request.GET.path %}	
		{% if request.GET.user %}
			{% get_breadcrumb request.GET.path request.GET.user %}
		{% else %}
			{% get_breadcrumb request.GET.path %}
		{% endif %}
	{% else %}
		{% get_breadcrumb request.path %}
	{% endif %}	
{% endblock %}

{% comment %}
{% block breadcrumbs %}
	<a href="../" class="inactive float-left">{% trans 'Home' %}</a><span class="active float-right">{% trans 'Password change' %}</span>
{% endblock %}
{% endcomment %}

{% block tools %}
{% if user.is_authenticated and user.is_staff %}
<div class="user-tools">
    <a href="../logout/">{% trans "Logout" %}</a>
    <a href=".">{% trans 'Change password' %}</a>
</div>
<div class="greeting float-right">
    {% trans 'Welcome,' %} {% if user.first_name %}{{ user.first_name|escape }}{% else %}{{ user.username }}{% endif %}
</div>
{% endif %}
{% endblock tools %}

{% block header_logo %}
<h1><a href="../">Django</a></h1>
{% endblock %}

{% block content %}
<form action="" method="post" selected="true">
    <h1>{% trans 'Password change' %}</h1>
    <div class="ui-bar ui-bar-e">{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</div>
    <fieldset>
        <div data-role="fieldcontain">
            <label for="id_old_password" class="required">{% trans 'Old password:' %} </label>
            {% if form.old_password.errors %}{{ form.old_password.errors }}{% endif %}
            {{ form.old_password }}
        </div>
        <div data-role="fieldcontain">
            <label for="id_new_password1" class="required">{% trans 'New password:' %}</label>
            {% if form.new_password1.errors %}{{ form.new_password1.errors }}{% endif %}
            {{ form.new_password1 }}
        </div>
        <div data-role="fieldcontain">
            <label for="id_new_password2" class="required">{% trans 'Confirm password:' %}</label>
            {% if form.new_password2.errors %}{{ form.new_password2.errors }}{% endif %}
            {{ form.new_password2 }}
        </div>
    </fieldset>
    {#<div class="submit-row" selected="true">#}
        {#<a href="javascript:;" onclick="document.forms[0].submit()" class="inactive float-right" data-role="button"></a>#}
    {#</div>#}

    <fieldset class="ui-grid-a">
        <div class="ui-block-a"><button type="reset" data-theme="a">Cancel</button></div>
        <div class="ui-block-b"><button type="submit" data-theme="b">{% trans 'Change my password' %}</button></div>	   
    </fieldset>
    
</form>
{% endblock %}
